package a.f;

import a.c.ab;
import a.c.*;
import a.c.x;
import a.f.l.c;
import a.f.l.g;
import a.f.l.h;
import a.f.l.i;
import a.i.y;

import java.awt.*;

public class eb
  extends r
{
  f_ g;
  g_ h;
  d_ i;
  public static boolean j;
  
  public boolean canLayout(o paramo)
  {
    return b(paramo);
  }
  
  public void doLayout(o paramo)
  {
    boolean bool = o.eg;
    int k = o.dg;
    if (this.g == null) {
      throw new IllegalStateException("PartitionFinder must not be null");
    }
    x localx = paramo.B();
    this.g.a(paramo, localx);
    a.c.n localn = paramo.C();
    Object localObject = paramo.w();
    do
    {
      if (!((a.c.m)localObject).e()) {
        break;
      }
      d locald = ((a.c.m)localObject).a();
      if (k != 0) {
        break label192;
      }
      if (!bool) {}
      localn.a(locald, localx.getInt(locald.e()) != localx.getInt(locald.f()));
      ((a.c.m)localObject).f();
    } while (k == 0);
    if ((!bool) && (!bool)) {
      if (a() != null)
      {
        localObject = new y(paramo);
        ((y)localObject).a(new ab(paramo.w(), localn));
        a().doLayout(paramo);
        ((y)localObject).g();
      }
    }
    label192:
    if (!bool) {
      if (this.h != null) {
        this.h.a(paramo, localx, localn);
      }
    }
    if ((bool) || (this.i != null)) {
      this.i.a(paramo, localx, localn);
    }
    paramo.a(localn);
    paramo.a(localx);
  }
  
  public f_ b()
  {
    return this.g;
  }
  
  public void a(f_ paramf_)
  {
    this.g = paramf_;
  }
  
  public g_ c()
  {
    return this.h;
  }
  
  public void a(g_ paramg_)
  {
    this.h = paramg_;
  }
  
  public d_ d()
  {
    return this.i;
  }
  
  public void a(d_ paramd_)
  {
    this.i = paramd_;
  }
  
  public static class b_
    implements eb.g_
  {
    t a = new t();
    public static boolean b;
    
    public b_()
    {
      this.a.a((byte)5);
    }
    
    public void a(o paramo, k paramk1, k paramk2)
    {
      y localy = new y(paramo);
      localy.a(new ab(paramo.w(), paramk2));
      this.a.doLayout(paramo);
      localy.g();
    }
    
    public t a()
    {
      return this.a;
    }
    
    public void a(t paramt)
    {
      this.a = paramt;
    }
  }
  
  public static class c_
    implements eb.f_
  {
    int a;
    int c = 2147483647;
    public static int d;
    
    public void a(o paramo, x paramx)
    {
      boolean bool = o.eg;
      int i = a.a.m.a(paramo).length;
      int j = this.c;
      if (!bool) {
        if (i > 1)
        {
          j += i - 1;
          if (bool) {
            break label71;
          }
          if (j <= 0) {
            j = this.c;
          }
        }
      }
      label71:
      a.a.n.a(paramo, paramx, false, Math.min(this.a, paramo.j()), j, null);
    }
    
    public int a()
    {
      return this.c;
    }
    
    public void a(int paramInt)
    {
      this.c = paramInt;
    }
    
    public int b()
    {
      return this.a;
    }
    
    public void b(int paramInt)
    {
      this.a = paramInt;
    }
  }
  
  public static class e_
    implements eb.d_
  {
    g a = new g();
    public static int b;
    
    public e_()
    {
      this.a.b(0.0D);
    }
    
    public Object a()
    {
      return this.a.c();
    }
    
    public void a(Object paramObject)
    {
      this.a.b(paramObject);
    }
    
    public void a(o paramo, k paramk1, k paramk2)
    {
      Object localObject = a();
      k localk = paramo.c(localObject);
      paramo.a(localObject, paramk2);
      this.a.b(localObject);
      this.a.b((byte)2);
      this.a.doLayout(paramo);
      if (!o.eg)
      {
        paramo.j(localObject);
        if (localk == null) {}
      }
      else
      {
        paramo.a(localObject, localk);
      }
    }
    
    public g b()
    {
      return this.a;
    }
    
    public void a(g paramg)
    {
      this.a = paramg;
    }
  }
  
  public static class a_
    implements eb.d_
  {
    private static final boolean a = false;
    private static final boolean b = true;
    private static final boolean c = false;
    private static final byte d = 1;
    private c e;
    private Object g;
    private boolean h;
    private double j;
    public static boolean k;
    
    public a_()
    {
      c.a_ locala_ = new c.a_();
      locala_.c((byte)1);
      locala_.c(0.75D);
      this.e = new c();
      this.e.b(locala_);
      this.g = rc.d;
      this.h = false;
      this.j = -1.0D;
    }
    
    public boolean a()
    {
      return this.h;
    }
    
    public void a(boolean paramBoolean)
    {
      this.h = paramBoolean;
    }
    
    public Object b()
    {
      return this.g;
    }
    
    public void a(Object paramObject)
    {
      this.g = paramObject;
    }
    
    public c c()
    {
      return this.e;
    }
    
    public void a(c paramc)
    {
      this.e = paramc;
    }
    
    public double d()
    {
      return this.j;
    }
    
    public void a(double paramDouble)
    {
      this.j = paramDouble;
    }
    
    public void a(o paramo, k paramk1, k paramk2)
    {
      boolean bool = o.eg;
      if (!bool) {
        if (this.h)
        {
          if (bool) {
            break label37;
          }
          a(paramo, paramk2);
          if (o.dg == 0) {
            return;
          }
        }
      }
      label37:
      c(paramo, paramk2);
    }
    
    private void a(o paramo, k paramk)
    {
      boolean bool = o.eg;
      paramo.a(this.g, paramk);
      rc localrc = this.e.b();
      if (!bool) {
        if ((localrc instanceof c.a_))
        {
          ((c.a_)localrc).c(this.g);
          if (bool) {
            break label96;
          }
          if (o.dg == 0) {
            break label79;
          }
        }
      }
      if (!bool)
      {
        if ((localrc instanceof h)) {
          ((h)localrc).a(this.g);
        }
        label79:
        localrc = this.e.c();
        if (bool) {}
      }
      else
      {
        if ((localrc instanceof i)) {
          label96:
          ((i)localrc).a(this.g);
        }
        a(paramo);
        paramo.j(this.g);
      }
    }
    
    private void c(o paramo, k paramk)
    {
      boolean bool2 = o.eg;
      int i = o.dg;
      k localk1 = paramo.c(ed.b);
      k localk2 = paramo.c(ed.a);
      a.c.n localn1 = paramo.C();
      a.c.n localn2 = paramo.C();
      dd localdd = new dd();
      a.c.m localm = paramo.w();
      label163:
      label164:
      label246:
      do
      {
        if (!localm.e()) {
          break;
        }
        d locald = localm.a();
        boolean bool1 = paramk.getBool(locald);
        if (i != 0) {
          break label314;
        }
        Object localObject1 = localk2 != null ? localk2.get(locald) : null;
        if (!bool2)
        {
          if (localObject1 != null)
          {
            if (bool2) {
              break label164;
            }
            localn1.a(locald, localObject1);
          }
        }
        else {
          if (i == 0) {
            break label163;
          }
        }
        if (!bool1) {
          localn1.a(locald, localdd.a(paramo, locald, true, false));
        }
        if (!bool2) {}
        Object localObject2 = localk1 != null ? localk1.get(locald) : null;
        if (!bool2)
        {
          if (localObject2 != null) {
            localn2.a(locald, localObject2);
          }
        }
        else
        {
          if (bool2) {
            continue;
          }
          if (i == 0) {
            break label246;
          }
        }
        if (!bool2)
        {
          if (!bool1) {
            localn2.a(locald, localdd.a(paramo, locald, false, false));
          }
          localm.f();
        }
      } while (i == 0);
      paramo.a(ed.a, localn1);
      paramo.a(ed.b, localn2);
      a(paramo);
      paramo.j(ed.b);
      paramo.j(ed.a);
      paramo.a(localn2);
      paramo.a(localn1);
      if ((!bool2) && (localk2 != null)) {
        label314:
        paramo.a(ed.a, localk2);
      }
      if (localk1 != null) {
        paramo.a(ed.b, localk1);
      }
    }
    
    private void a(o paramo)
    {
      boolean bool = o.eg;
      Rectangle localRectangle = paramo.d();
      double d1 = localRectangle.width;
      double d2 = localRectangle.height;
      double d3 = (bool) || (d2 != 0.0D) ? d1 / d2 : 1.0D;
      if (!bool) {
        if (d3 > 1.0D)
        {
          d5 = d2 * this.j;
          d6 = 2.0D * d5 + d2;
          d4 = (d6 * d3 - d1) / 2.0D;
          if (bool) {
            break label119;
          }
          if (o.dg == 0) {
            break label133;
          }
        }
      }
      double d4 = d1 * this.j;
      double d6 = 2.0D * d4 + d1;
      label119:
      double d5 = (d6 / d3 - d2) / 2.0D;
      label133:
      e locale1 = null;
      e locale2 = null;
      e locale3 = null;
      e locale4 = null;
      double d7;
      if ((bool) || (d5 >= 0.0D))
      {
        d7 = Math.max(d4, 0.0D);
        locale1 = paramo.i();
        paramo.b(locale1, d1 + 2.0D * d7 + 20.0D, 10.0D);
        paramo.c(locale1, localRectangle.x - d7 - 10.0D, localRectangle.y - d5 - 10.0D);
        locale3 = paramo.i();
        paramo.b(locale3, d1 + 2.0D * d7 + 20.0D, 10.0D);
        paramo.c(locale3, localRectangle.x - d7 - 10.0D, localRectangle.y + d2 + d5);
      }
      if ((bool) || (d4 >= 0.0D))
      {
        d7 = Math.max(d5, 0.0D);
        locale2 = paramo.i();
        paramo.b(locale2, 10.0D, d2 + 2.0D * d7);
        paramo.c(locale2, localRectangle.x - d4 - 10.0D, localRectangle.y - d7);
        locale4 = paramo.i();
        paramo.b(locale4, 10.0D, d2 + 2.0D * d7);
        paramo.c(locale4, localRectangle.x + d1 + d4, localRectangle.y - d7);
      }
      this.e.doLayout(paramo);
      if (!bool) {
        if (locale4 != null) {
          paramo.a(locale4);
        }
      }
      if (!bool) {
        if (locale2 != null) {
          paramo.a(locale2);
        }
      }
      if (!bool) {
        if (locale3 != null) {
          paramo.a(locale3);
        }
      }
      if (locale1 != null) {
        paramo.a(locale1);
      }
    }
  }
  
  public static abstract interface d_
  {
    public abstract void a(o paramo, k paramk1, k paramk2);
  }
  
  public static abstract interface g_
  {
    public abstract void a(o paramo, k paramk1, k paramk2);
  }
  
  public static abstract interface f_
  {
    public abstract void a(o paramo, x paramx);
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.eb

 * JD-Core Version:    0.7.0.1

 */